<?php
namespace Mentors\Model;
use Think\Model;

class PlanDetailsModel extends Model {

    protected $_validate = array (
		array('title','require','Title cannot be empty', 1),
		array('content','require','Descriptions cannot be empty', 1),
    );	

    protected $_auto = array (
		array('startTime','_startTime',Model::MODEL_BOTH,'callback'),
		array('endTime','_endTime',Model::MODEL_BOTH,'callback'),
	);

	protected function _startTime(){
        return strtotime(I('post.startTime'));
    }

    protected function _endTime(){
        return strtotime(I('post.endTime'));
    }

}
?>